A phase-change material (PCM) includes a material that melts or solidifies at certain temperatures. In some cases, heat is absorbed by a PCM when the PCM changes from solid to liquid. The heat melts the PCM, turning it into a liquid. In some cases, heat is released by a PCM when the PCM changes from liquid to solid. The heat leaves the PCM, allowing the PCM to cool and to solidify.